import request from '@/utils/request'

/**
 * 获取公司详情信息
 */
export function GetCompanyInfo() {
    return request({
        url: '/company/details/find',
        method: 'post',
        data: {
            id: 1
        }
    })
}

/**
 * 设置公司详情信息
 */
export function SetCompanyInfo(param) {
    return request({
        url: '/company/details/update',
        method: 'post',
        data: param
    })
}

/**
 * 获取轮播图
 * @param {number} currPage 当前页
 * @param {number} pageSize 页容
 */
export function GetSlideList(param) {
    return request({
        url: '/carousel/query',
        method: 'post',
        data: {
            currPage: param.currPage,
            pageSize: param.pageSize
        }
    })
}

/**
 * 添加轮播图
 * @param {number} param.carouselId 轮播图id
 * @param {string} param.remarks 备注
 * @param {string} param.sortNumber 排列序号
 */
export function addSlideImage(param) {
    return request({
        url: '/carousel/add',
        method: 'post',
        data: {
            carouselId: param.carouselId,
            remarks: param.remarks,
            sortNumber: param.sortNumber
        }
    })
}

/**
 * 修改轮播图数据
 * @param {number} param.carouselId 轮播图id
 * @param {string} param.remarks 备注
 * @param {string} param.sortNumber 排列序号
 * @param {number} param.id 轮播图数据Id
 */
export function SetSlideInfo(param) {
    return request({
        url: '/carousel/update',
        method: 'post',
        data: {
            id: param.id,
            carouselId: param.carouselId,
            remarks: param.remarks,
            sortNumber: param.sortNumber
        }
    })
}

/**
 * 删除轮播图数据
 * @id {number} 轮播图id
 */
export function deleteSlideInfo(id) {
    return request({
        url: '/carousel/delete',
        method: 'post',
        data: {
            id
        }
    })
}